<template>
  <p class="shang">{{ banners.comingTitle }}</p>
  <div class="hz" @click="$router.push({ path: '/caseinfoeditor',query:{id:banners.id} })">
    <div class="hzleft">
      <img :src="banners.img" alt="" />
    </div>
    <div class="hzright">
      <div class="content">
        <div class="title">
          <p>{{ banners.nm }}</p>
          <!-- <div class="version">
            <p>2D</p>
            <p>IMAX</p>
          </div> -->
        </div>
        <div class="score" v-if="banners.pubDesc">
          <b>{{ banners.wish }}</b
          >&nbsp;人看过
        </div>
        <div class="score" v-if="!banners.pubDesc">
          <b>{{ banners.wish }}</b
          >人想看
        </div>
        <div class="actor" v-if="banners.star">主演:{{ banners.star }}</div>
        <div class="actor" v-if="!banners.star"></div>
        <div class="show-info" v-if="banners.rt">
          {{ banners.rt }}&nbsp;上映
        </div>
        <div class="show-info" v-if="!banners.rt"></div>
      </div>
      <div class="redbtn" v-if="index<='1'">
        <span>预售</span>
      </div>
      <div class="bluebtn" v-if="index>'1'">
        <span>想看</span>
      </div>
    </div>
  </div>
</template>

<script setup>
defineProps({
  banners: {
    required: true,
  },
  index: {
    required: true,
  },
});
</script>

<style lang="scss" scoped>
.shang{
  padding: 12rem 15rem 0;
  font-size: 14rem;
  color: #333;
}
.hz {
  margin: 5rem 0;
  height: 95rem;
  display: flex;
  .hzleft {
    width: 60rem;
    height: 95rem;
    img {
      margin: 10rem 0 0 10rem;
      width: 100%;
      height: 100%;
    }
  }
  .hzright {
    width: 80vw;
    height: 107rem;
    display: flex;
    margin-left: 15rem;
    padding-bottom: 5rem;
    border-bottom: 1rem solid #aaa;
    justify-content: space-between;
    .content {
      .title {
        margin: 10rem 0 0 5rem;
        font-size: 17rem;
        font-weight: 700;
        color: #333;
        display: flex;
        .version {
          display: flex;
          p {
            font-size: 10rem;
            line-height: 20rem;
          }
          :nth-child(1) {
            width: 20rem;
            height: 20rem;
            margin: 2rem 0 0 0;
            transform: scale(0.7, 0.7);
            text-align: center;
            background-color: #509fc9;
            color: #fff;
            box-sizing: border-box;
          }
          :nth-child(2) {
            height: 20rem;
            margin: 2rem 0 0 -8rem;
            transform: scale(0.7, 0.7);
            background-color: #fff;
            color: #509fc9;
            border: 1rem solid #509fc9;
            box-sizing: border-box;
          }
        }
      }
      .score {
        margin: 5rem 0 0 5rem;
        font-size: 14px;
        color: #666;
        b {
          color: #faaf00;
        }
      }
      .actor {
        width: 210rem;
        margin: 5rem 0 0 5rem;
        font-size: 14px;
        color: #666;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .show-info {
        margin: 5rem 0 0 5rem;
        font-size: 14px;
        color: #666;
      }
    }
    .bluebtn {
      width: 45rem;
      height: 25rem;
      padding: 2rem;
      color: #fff;
      line-height: 20rem;
      text-align: center;
      border-radius: 20rem;
      margin: 50rem 10rem 0 0;
      background-color: #faaf00;
    }
    .redbtn {
      width: 45rem;
      height: 25rem;
      padding: 2rem;
      color: #fff;
      margin: 50rem 10rem 0 0;
      line-height: 20rem;
      text-align: center;
      border-radius: 20rem;
      background-color: #509fc9;
    }
  }
}
</style>
